package com.maoxx.stuchoosemssbv_service.service;

import com.maoxx.stuchoosemssbv_service.entity.Course;
import com.maoxx.stuchoosemssbv_service.entity.CourseTeacher;
import com.maoxx.stuchoosemssbv_service.entity.CourseTeacherInfo;
import com.maoxx.stuchoosemssbv_service.entity.CourseTeacherRowsDTO;
import com.maoxx.stuchoosemssbv_service.mapper.CourseTeacherMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @className: CourseTeacherService
 * @author: Maoxx
 * @date: 2024/11/4 23:12
 * @Version: 1.0
 * @description:
 */

@Service
public class CourseTeacherService {
    @Autowired
    private CourseTeacherMapper courseTeacherMapper;

    public boolean deleteById(CourseTeacherRowsDTO courseTeacherRowsDTO) {
        return courseTeacherMapper.deleteById(courseTeacherRowsDTO);
    }

    public List<CourseTeacherInfo> findCourseTeacherInfo() {
        return courseTeacherMapper.findCourseTeacherInfo();
    }

    public List<Course> findMyCourse(Integer tid, String term) {
        return courseTeacherMapper.findMyCourse(tid, term);
    }
}
